Squelch error message from iptables (we log this later if necessary).
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Mon, 12 Dec 2005 16:44:27 +0000 (16:44 +0000)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Mon, 12 Dec 2005 16:44:27 +0000 (16:44 +0000)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/examples/vif-common.sh

index 105a843900612fcfd71b661f09daf7a373e15842..8c997f0d9990e93b23015ab9730bf68321971b20 100644 (file)
@@ -62,7 +62,8 @@ function frob_iptable()
     local c="-D"
   fi
 
-  iptables "$c" FORWARD -m physdev --physdev-in "$vif" "$@" -j ACCEPT ||
+  iptables "$c" FORWARD -m physdev --physdev-in "$vif" "$@" -j ACCEPT \
+    2>/dev/null ||
     [ "$c" == "-D" ] ||
     log err \
      "iptables $c FORWARD -m physdev --physdev-in $vif $@ -j ACCEPT failed.